//属性扩展
let [a,b,c] = [1,2,3]
// console.log("a="+a+'/b='+b+'/c='+c)
let arr = [1,2,3]
// console.log(...arr)
let obj = {a:33,c:11,d:44}
let obj2 = {...obj,e:55}
// console.log(obj2)
// 参数的定义
function f([x, y, z]) { 
}
f([1, 2, 3]);
function f2({x, y, z}) {  }
f2({z: 3, y: 2, x: 1});

{
    var globalA = 'test'
    let letb = 'test22'
}
// console.log(globalA)//test22
// console.log(letb)// ReferenceError: b is not defined.
const constA="test"

global.testa="test"
// console.log(global)

let arr1 = [3, 5, 7];
arr.foo = 'hello';

for (let i in arr1) {
  console.log(i); // "0", "1", "2", "foo"
}

for (let i of arr1) {
  console.log(i); //  "3", "5", "7"
}
